package com.primefaces.sample;

import javax.faces.bean.ManagedBean;
import org.primefaces.event.SlideEndEvent;
 
@ManagedBean
public class SliderBean {
	 
	private int number;
	
	private String category = "Start";

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}
	

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public void onSlideEnd(SlideEndEvent event) {
	 	int value = event.getValue();
	 	if(value > 0 && value <= 50) {
	 		category = "Khalil";
	 	 } else if(value > 50 && value <= 100) {
	 		category = "Amine";
	 	 } else {
		 		category = "Start";
		 } 
	}
	


}
